class LoginModel {
  String? accessToken;
  String? tokenType;
  String? imAccid;
  String? imToken;
  int? userId;
  int? status;
  String? initStep;
  dynamic gender;
  String? phone;
  String? userType;

  LoginModel(
      {this.accessToken,
      this.tokenType,
      this.imAccid,
      this.imToken,
      this.userId,
      this.status,
      this.initStep,
      this.gender,
      this.phone,
      this.userType});

  LoginModel.fromJson(Map<String, dynamic> json) {
    accessToken = json["access_token"];
    tokenType = json["token_type"];
    imAccid = json["im_accid"];
    imToken = json["im_token"];
    userId = (json["user_id"] as num).toInt();
    status = (json["status"] as num).toInt();
    initStep = json["initStep"];
    gender = json["gender"];
    phone = json["phone"];
    userType = json["userType"];
  }

  static List<LoginModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(LoginModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> json = <String, dynamic>{};
    json["access_token"] = accessToken;
    json["token_type"] = tokenType;
    json["im_accid"] = imAccid;
    json["im_token"] = imToken;
    json["user_id"] = userId;
    json["status"] = status;
    json["initStep"] = initStep;
    json["gender"] = gender;
    json["phone"] = phone;
    json["userType"] = userType;
    return json;
  }

  LoginModel copyWith({
    String? accessToken,
    String? tokenType,
    String? imAccid,
    String? imToken,
    int? userId,
    int? status,
    String? initStep,
    dynamic gender,
    String? phone,
    String? userType,
  }) =>
      LoginModel(
        accessToken: accessToken ?? this.accessToken,
        tokenType: tokenType ?? this.tokenType,
        imAccid: imAccid ?? this.imAccid,
        imToken: imToken ?? this.imToken,
        userId: userId ?? this.userId,
        status: status ?? this.status,
        initStep: initStep ?? this.initStep,
        gender: gender ?? this.gender,
        phone: phone ?? this.phone,
        userType: userType ?? this.userType,
      );
}
